package com.business.dynamic.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.business.dynamic.entity.DynamicMessage;
import com.business.dynamic.entity.vo.DynamicMessageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 动态评论或者赞消息表:数据层
 *
 * @author chenjiehong
 * @date 2019-12-02 17:55:03
 * @since 1.0
 */
public interface DynamicMessageMapper extends BaseMapper<DynamicMessage> {

    List<Map<String, Integer>> getCountByType(@Param("userId") Integer userId);


    Integer getCount(@Param("ew") Wrapper<DynamicMessage> wrapper);

    List<DynamicMessageVo> queryCommentMessagePage(@Param("page") Page<DynamicMessage> page, @Param("ew") Wrapper<DynamicMessage> wrapper);

    List<DynamicMessageVo> queryLikeMessagePage(@Param("page") Page<DynamicMessage> page, @Param("ew") Wrapper<DynamicMessage> wrapper);
}
